#include <stdio.h>
#include <setjmp.h>
#include <stdlib.h>

static jmp_buf env;

void f1(){
    switch (setjmp(env))
    {
    case 0:
        puts("First run, set setjmp");
        break;
    case 1:
        puts("Second run, setjmp");
        break;    
    default:
        break;
    }

}



int main(){
    f1();
    puts("Try run longjmp");
    longjmp(env, 1);
    puts("Finish run longjmp");
    exit(EXIT_SUCCESS);
}